package lt.inkredibl.iit;

import java.awt.event.MouseEvent;
import java.awt.geom.Point2D;


public interface ICoordTransformer
{

	/**
	 * User interface value to internal coords value.
	 * @param d
	 * @return
	 */
	double ui2ic(double d);

	/**
	 * User interface point to internal coords point.
	 */
	Point2D ui2ic(Point2D p);

	/**
	 * The same as <code>ui2ic()</code>, but modify the point in place.
	 * @param p
	 */
	void ui2icInPlace(Point2D p);

	/**
	 * Internal coords value to user interface value.
	 * @param d
	 * @return
	 */
	double ic2ui(double d);

	/**
	 * Internal coords size to user interface size. Returned value must cover everything in UI...
	 * @param d
	 * @return
	 */
	int ic2uiSize(double d);

	/**
	 * Internal coords point to user interface point.
	 * @param p
	 * @return
	 */
	Point2D ic2ui(Point2D p);

	/**
	 * The same as <code>ic2ui()</code>, but modify the point in place.
	 * @param p
	 */
	void ic2uiInPlace(Point2D p);

	/**
	 * Extract internal coords point from user interface mouse event. Convenience method.
	 * @param evt
	 * @return
	 */
	Point2D extractPoint(MouseEvent evt);

}